\subsection{Winding numbers}
Let \( \gamma \colon [a,b] \to \mathbb C \) be a closed, piecewise \( C^1 \) curve, and let \( w \not\in \Im \gamma \).
For all \( t \), there exists \( r(t) > 0 \) and \( \theta(t) \in \mathbb R \) such that \( \gamma(t) = w + r(t) e^{i\theta(t)} \).
Then, the function \( r \colon [a,b] \to \mathbb R \) is given by \( r(t) = \abs{\gamma(t) - w} \), so it is uniquely determined and piecewise \( C^1 \).
\begin{definition}
	If we have a continuous choice of \( \theta \colon [a,b] \to \mathbb R \) such that \( \gamma(t) = w + r(t) e^{i\theta(t)} \), then we define the \textit{winding number} or the \textit{index} of \( \gamma \) about \( w \) as
	\[
		I(\gamma; w) = \frac{\theta(b) - \theta(a)}{2\pi}
	\]
\end{definition}
If \( \gamma \) is a closed curve, \( I(\gamma;w) \) is an integer.
This is because
\[ \gamma(a) = \gamma(b) \implies \exp(i\theta(b) - i\theta(a)) = 1 \]
If \( \theta_1 \colon [a,b] \to \mathbb C \) is also continuous such that \( \gamma(t) = w + re^{i\theta_1(t)} \), then \( \exp(i\theta(t) - i\theta_1(t)) = 1 \), so
\[ \frac{\theta_1(t) - \theta(t)}{2\pi} \in \mathbb Z \]
Since \( \theta_1 - \theta \) is continuous, this quotient must be a constant.
Hence, \( I(\gamma;w) \) is well-defined and independent of the (continuous) choice of \( \theta \).
\begin{lemma}
	Let \( w \in \mathbb C \) and \( \gamma \colon [a,b] \to \mathbb C \setminus \qty{w} \), where \( \gamma \) is piecewise \( C^1 \).
	Then, there exists a piecewise \( C^1 \) function \( \theta \colon [a,b] \to \mathbb R \) such that \( \gamma(t) = w + r(t) e^{i\theta(t)} \), where \( r(t) = \abs{\gamma(t) - w} \).
	If \( \gamma \) is closed, then we also have
	\[
		I(\gamma; w) = \frac{1}{2\pi i} \int_\gamma \frac{\dd{z}}{z-w}
	\]
\end{lemma}
\begin{remark}
	If \( \gamma \) is \( C^1 \), and there is a \( C^1 \) function \( \theta \) such that \( \gamma(t) = w + r(t) e^{i\theta(t)} \), then
	\[
		\gamma'(t) = (r'(t) + ir(t) \theta'(t))e^{i\theta(t)} = \qty(\frac{r'(t)}{r(t)} + i\theta'(t)) r(t) e^{i\theta(t)} = \qty(\frac{r'(t)}{r(t)} + i\theta'(t))(\gamma(t) - w)
	\]
	Hence,
	\[
		\theta'(t) = \Im \frac{\gamma'(t)}{\gamma(t) - w} \implies \theta(t) = \theta(a) + \Im \int_a^t \frac{\gamma'(s) \dd{s}}{\gamma(s) - w}
	\]
\end{remark}
\begin{proof}
	Let \( h(t) = \int_a^t \frac{\gamma'(s)}{\gamma(s) - w} \dd{s} \).
	The integrand is bounded on \( [a,b] \), and is continuous except at the finite number of points at which \( \gamma' \) may be discontinuous.
	Hence, \( h \colon [a,b] \to \mathbb C \) is continuous.
	Further, \( h \) is differentiable with \( h'(t) = \frac{\gamma'(t)}{\gamma(t) - w} \) at each \( t \) where \( \gamma' \) is continuous.
	Hence, \( h \) is piecewise \( C^1 \).
	This induces an ordinary differential equation for \( \gamma(t) - w \).
	\[
		(\gamma(t) - w)' - (\gamma(t) - w)h'(t) = 0
	\]
	which is true for all \( t \in [a,b] \) except possibly for a finite set.
	Hence,
	\[
		\dv{t} \qty((\gamma(t) - w) e^{-h(t)}) = \gamma'(t) e^{-h(t)} - (\gamma(t) - w)e^{-h(t)} h'(t) = 0
	\]
	except for finitely many \( t \).
	Since \( (\gamma(t) - w)e^{-h(t)} \) is continuous, it must be constant, and equal to its value at \( t = a \).
	Hence
	\[
		\gamma(t) - w = (\gamma(a) - w)e^{h(t)} = (\gamma(a) - w)e^{\Re h(t)} e^{i\Im h(t)} = \abs{\gamma(a)-w} e^{\Re h(t)} e^{i(\alpha + \Im h(t)}
	\]
	for \( \alpha \) such that \( e^{i\alpha} = \frac{\gamma(a) - w}{\abs{\gamma(a) - w}} \).
	Hence, we can set \( \theta(t) = \alpha + \Im h(t) \).

	For the second part, note that
	\[
		I(\gamma;w) = \frac{\theta(b) - \theta(a)}{2\pi} = \frac{\Im(h(b) - h(a))}{2\pi} = \frac{\Im h(b)}{2\pi}
	\]
	Since \( \gamma(t) - w = (\gamma(a) - w)e^{h(t)} \) and \( \gamma(b) = \gamma(a) \), we have \( e^{h(b)} = 1 \), so \( \Re h(b) = 0 \) and \( \Im h(b) = -i h(b) \).
	Thus,
	\[
		I(\gamma;w) = \frac{1}{2\pi i} h(b) = \frac{1}{2\pi i} \int_a^b \frac{\gamma'(s)}{\gamma(s) - w} \dd{s} = \frac{1}{2\pi i} \int_\gamma \frac{\dd{z}}{z-w}
	\]
\end{proof}
\begin{remark}
	It is also true that \( \theta \) exists and is continuous if \( \gamma \) is merely continuous, but the formula for the winding number is not useful, so we omit this proof.
\end{remark}
\begin{proposition}
	If \( \gamma \colon [a,b] \to \mathbb C \) is a closed curve, then the function \( w \mapsto I(\gamma;w) \) is continuous on \( \mathbb C \setminus \Im \gamma \).
	Since \( I(\gamma;w) \) is integer-valued, \( I(\gamma;w) \) is locally constant.
	So \( I(\gamma;w) \) is constant for each connected component of the open set \( \mathbb C \setminus \Im \gamma \).
\end{proposition}
\begin{proof}
	Exercise.
\end{proof}
\begin{proposition}
	If \( \gamma \colon [a,b] \to D(z_0, R) \) is a closed curve, then \( I(\gamma;w) = 0 \) for all \( w \in \mathbb C \setminus D(z_0,R) \).

	If \( \gamma \colon [a,b] \to \mathbb C \) is a closed curve, then there exists a unique unbounded connected component \( \Omega \) of \( \mathbb C \setminus \gamma([a,b]) \), and \( I(\gamma;w) = 0 \) for all \( w \in \Omega \).
\end{proposition}
\begin{proof}
	For the first part, if \( w \in \mathbb C \setminus D(z_0, R) \), then the function \( f(z) = \frac{1}{z-w} \) is holomorphic in \( D(z_0,R) \).
	Hence \( I(\gamma;w) = 0 \) by the convex version of Cauchy's theorem.

	For the second part, since \( \gamma([a,b]) \) is compact (by continuity of \( \gamma \)), there exists \( R > 0 \) such that \( \gamma([a,b]) \subset D(0,R) \).
	Since \( \mathbb C \setminus D(0,R) \) is a connected subset of \( \mathbb C \setminus \gamma([a,b]) \), there exists a connected component \( \Omega \) of \( \mathbb C \setminus \gamma([a,b]) \) such that \( \mathbb C \setminus D(0,R) \subseteq \Omega \).
	This component is unbounded.
	Any other component is disjoint from \( \mathbb C \setminus D(0,R) \), so is contained within \( D(0,R) \) and is hence bounded.
	So the unbounded component is unique.
	Since \( I(\gamma;w) \) is locally constant and zero on \( \mathbb C \setminus D(0,R) \), it is zero on \( \Omega \).
\end{proof}

\subsection{Continuity of derivative function}
\begin{lemma}
	Let \( f \colon U \to \mathbb C \) be holomorphic, and define \( g \colon U \times U \to \mathbb C \) by
	\[
		g(z,w) = \begin{cases}
			\frac{f(z) - f(w)}{z-w} & \text{if } z \neq w \\
			f'(w)                   & \text{if } z = w
		\end{cases}
	\]
	Then \( g \) is continuous.
	Moreover, if \( \gamma \) is a closed curve in \( U \), then the function \( h(w) = \int_\gamma g(z,w) \dd{z} \) is holomorphic on \( U \).
\end{lemma}
\begin{proof}
	It is clear that \( g \) is continuous at \( (z,w) \) if \( z \neq w \).
	To check continuity at a point \( (a,a) \in U \times U \), let \( \varepsilon > 0 \) and choose \( \delta > 0 \) such that \( D(a,\delta) \subseteq U \) and \( \abs{f'(z) - f'(a)} < \varepsilon \) for all \( z \in D(a,\delta) \).
	This is always possible since \( f' \) is continuous.

	Let \( z,w \in D(a,\delta) \).
	If \( z = w \), then \( \abs{g(z,w) - g(a,a)} = \abs{f'(z) - f'(a)} < \varepsilon \).
	If \( z \neq w \), we have \( tz + (1-t)w \in D(a,\delta) \) for \( t \in [0,1] \).
	Hence,
	\begin{align*}
		f(z) - f(w) & = \int_0^1 \dv{t} f(tz+(1-t)w) \dd{t} \\
		            & = \int_0^1 f'(tz+(1-t)w)(z-w) \dd{t}  \\
		            & = (z-w) \int_0^1 f'(tz+(1-t)w) \dd{t}
	\end{align*}
	Thus,
	\begin{align*}
		\abs{g(z,w) - g(a,a)} & = \abs{\frac{f(z) - f(w)}{z-w} - f'(a)}                           \\
		                      & = \abs{\int_0^1 \qty[f'(tz+(1-t)w) - f'(a)] \dd{t}}               \\
		                      & \leq \sup_{t \in [0,1]} \abs{f'(tz+(1-t)w) - f'(a)} < \varepsilon
	\end{align*}
	Hence \( \abs{(z,w) - (a,a)} < \delta \) implies \( \abs{g(z,w) - g(a,a)} < \varepsilon \), so \( g \) is continuous at \( (a,a) \).

	To show \( h \) is holomorphic, we must first check that \( h \) is continuous.
	Let \( w_0 \in W \), and suppose \( w_n \to w_0 \).
	Let \( \delta > 0 \) such that \( \overline{D(w_0, \delta)} \subset U \).
	The function \( g \) is continuous on \( U \times U \), so it is uniformly continuous on the compact subset \( \Im \gamma \times \overline{D(w_0,\delta)} \subset U \times U \).
	Thus, if we let \( g_n(z) = g(z,w_n) \) and \( g_0(z) = g(z,w_0) \) for \( z \in \Im \gamma \), then \( g_n \to g_0 \) uniformly on \( \Im \gamma \).
	Hence \( \int_\gamma g_n(z) \dd{z} \to \int_\gamma g_0(z) \dd{z} \).
	In other words, \( h(w_n) \to h(w_0) \).
	Thus, \( h \) is continuous.

	Now, we can use the convex Cauchy's theorem and Morera's theorem to show \( h \) is holomorphic on \( U \).
	For \( w_0 \in U \), we can choose a disc \( D(w_0, \delta) \subset U \).
	Suppose that \( \gamma \) is parametrised over \( [a,b] \), and let \( \beta \colon [c,d] \to D(w_0,\delta) \) be any closed curve.
	Then \( h(w) = \int_\gamma g(z,w) \dd{z} = \int_a^b g(\gamma(t),w) \gamma'(t) \dd{t} \), hence
	\begin{align*}
		\int_\beta h(w) \dd{w} & = \int_c^d \qty(\int_a^b g(\gamma(t),\beta(s))\gamma'(t)\beta'(s) \dd{t})\dd{s} \\
		                       & = \int_a^b \qty(\int_c^d g(\gamma(t),\beta(s))\gamma'(t)\beta'(s) \dd{s})\dd{t} \\
		                       & = \int_\gamma \qty(\int_\beta g(z,w) \dd{w}) \dd{z}
	\end{align*}
	by Fubini's theorem, which will be proven below.
	By a previous theorem, for all \( z \in U \), the function \( w \mapsto g(z,w) \) is holomorphic in \( D(w_0, \delta) \) (and hence in \( U \)), since it is continuous in \( U \) and holomorphic except at a single point \( z \).
	Hence, by the convex version of Cauchy's theorem, \( \int_\beta g(z,w) \dd{w} = 0 \).
	Hence, \( \int_\beta h(w) \dd{w} = 0 \).
	By Morera's theorem, \( h \) is holomorphic in \( D(w_0, \delta) \) and hence on \( U \).
\end{proof}
\begin{lemma}[Fubini's theorem]
	If \( \varphi \colon [a,b] \times [c,d] \to \mathbb R \) is continuous, then \( f_1 \colon s \mapsto \int_c^d \varphi(s,t) \dd{t} \) is continuous on \( [a,b] \), the function \( f_2 \colon t \mapsto \int_a^b \varphi(s,t) \dd{t} \) is continuous on \( [c,d] \), and
	\[
		\int_a^b \qty( \int_c^d \varphi(s,t) \dd{t} ) \dd{s} = \int_c^d \qty( \int_a^b \varphi(s,t) \dd{s} ) \dd{t}
	\]
\end{lemma}
\begin{proof}
	Since \( \varphi \) is continuous on the compact set \( [a,b] \times [c,d] \), it is uniformly continuous.
	Hence, given \( \varepsilon > 0 \), there exists \( \delta > 0 \) such that \( \abs{s_1 - s_2} < \delta \implies \abs{\varphi(s_1, t) - \varphi(s_2, t)} < \varepsilon \) for all \( t \in [c,d] \), so \( \abs{f_1(s_1) - f_1(s_2)} < (d-c) \varepsilon \), so \( f_1 \) is continuous.
	Similarly, \( f_2 \) is continuous.
	Note that since \( \varphi \) is uniformly continuous, it is the uniform limit of a sequence of step functions of the form \( g(x,y) = \sum_{j=1}^N \alpha_j \chi_{R_j}(x,y) \) where \( \alpha_j \) are constants, and \( R_j \) are sub-rectangles of the form \( R_j = [a_j, b_j) \times [c_j, d_j) \) such that \( \bigcup R_j \) is a finite partition of \( [a,b) \times [c,d) \), and \( \chi_{R_j} \) is the characteristic function of \( R_j \)
	For such step functions, we can easily check the interchangability of the integrals.
\end{proof}

\subsection{Cauchy's theorem and Cauchy's integral formula}
\begin{definition}
	Let \( U \subseteq \mathbb C \) be open.
	A closed curve \( \gamma \colon [a,b] \to U \) is said to be \textit{homologous to zero} in \( U \) if \( I(\gamma; w) = 0 \) for all \( w \in \mathbb C \setminus U \).
\end{definition}
\begin{theorem}
	Let \( U \) be a non-empty open subset of \( \mathbb C \), and \( \gamma \) be a closed curve in \( U \) homologous to zero in \( U \).
	Then,
	\[
		I(\gamma;w) f(w) = \frac{1}{2\pi i} \int_\gamma \frac{f(z) \dd{z}}{z-w}
	\]
	for every holomorphic function \( f \colon U \to \mathbb C \) and every \( w \in U \setminus \Im \gamma \).
	Further,
	\[
		\int_\gamma f(z) \dd{z} = 0
	\]
	for every holomorphic \( f \colon U \to \mathbb C \).
\end{theorem}
\begin{remark}
	Cauchy's theorem states that if \( \int_\gamma f(z) \dd{z} = 0 \) for a specific family of holomorphic functions on \( U \), namely for \( f_w(z) = \frac{1}{z-w} \) where \( w \in \mathbb C \setminus U \), then \( \int_\gamma f(z) \dd{z} = 0 \) for any holomorphic function \( f \colon U \to \mathbb C \).

	The first and second parts as statements are equivalent.
	Indeed, if we assume the Cauchy integral formula holds, simply apply the formula with \( F(z) = (z-w)f(z) \).
	Since \( F(w) = 0 \), we have \( \int_\gamma f(z) \dd{z} = 0 \).
	If we assume Cauchy's theorem, for any \( w \in U \), the function
	\[
		g(z) = \begin{cases}
			\frac{f(z) - f(w)}{z-w} & \text{if } z \neq w \\
			f'(w)                   & \text{if } z = w
		\end{cases}
	\]
	is holomorphic in \( U \) as seen above.
	Hence \( \int_\gamma g(z) \dd{z} = 0 \), so \( \frac{1}{2\pi i} \int_\gamma \frac{f(z) \dd{z}}{z-w} = I(\gamma;w) f(w) \) for all \( w \not\in \Im \gamma \).

	Note that the statement that \( \gamma \) is homologous to zero is equivalent to Cauchy's theorem being valid for all \( f \).
	For example, given \( w \in \mathbb C \setminus U \), we can apply Cauchy's theorem to \( f(z) = \frac{1}{z-w} \) to get \( I(\gamma;w) = 0 \).
	The converse is proven in the theorem following this proof.
	This is also equivalent to Cauchy's integral formula being valid for all \( f \).
\end{remark}
\begin{proof}
	It suffices to prove part (i).
	Equivalently, for all \( w \in U \setminus \Im \gamma \),
	\[
		\int_\gamma \frac{f(z) - f(w)}{z-w} \dd{z} = 0 \iff \int_\gamma g(z,w) \dd{z} = 0
	\]
	where
	\[
		g(z,w) = \begin{cases}
			\frac{f(z) - f(w)}{z-w} & \text{if } z \neq w \\
			f'(w)                   & \text{if } z = w    \\
		\end{cases}
	\]
	Now, define
	\[
		h \colon U \to \mathbb C;\quad h(w) = \int_\gamma g(z,w) \dd{z}
	\]
	By the above lemma, this is holomorphic on \( U \).
	We will show that \( h = 0 \).
	We will extend \( h \) to a holomorphic function \( H \colon \mathbb C \to \mathbb C \) and prove that \( H(w) \to 0 \) as \( w \to \infty \), then we can apply Liouville's theorem.

	To extend \( h \) into an entire function \( H \), by definition of \( \gamma \) being homologous to zero in \( U \), we have \( \mathbb C \setminus U \subseteq V \equiv \qty{w \in \mathbb C \setminus \Im \gamma \colon I(\gamma;w) = 0 } \).
	So \( \mathbb C = U \cup V \), and \( V \) is open since \( I(\gamma;\wildcard) \) is locally constant.
	For \( w \in U \cap V \), we have
	\[
		h(w) = \int_\gamma \frac{f(z) - f(w)}{z-w} \dd{z} = \int_\gamma \frac{f(z) \dd{z}}{z-w}
	\]
	since \( \int_\gamma \frac{\dd{z}}{z-w} = 2\pi i \cdot I(\gamma;w) = 0 \) as \( w \in V \).
	Hence, on \( U \cap V \), the function \( h \) agrees with
	\[
		h_1 \colon V \to \mathbb C;\quad h_1(w) = \int_\gamma \frac{f(z) \dd{z}}{z-w}
	\]
	We know that \( h_1 \) is holomorphic on \( V \).
	Hence, the function \( H \colon \mathbb C \to \mathbb C \) defined by
	\[
		H(w) = \begin{cases}
			h(w)   & w \in U \\
			h_1(w) & w \in V
		\end{cases}
	\]
	is well-defined and holomorphic.

	Now, we will show \( H(w) \to 0 \) as \( \abs{w} \to \infty \).
	Let \( R > 0 \) such that \( \Im \gamma \subset D(0,R) \), which is possible since \( \Im \gamma \) is compact.
	Hence, \( \mathbb C \setminus D(0,R) \subseteq V \).
	If \( \abs{w} > R \),
	\[
		\abs{H(w)} = \abs{h_1(w)} = \abs{\int_\gamma \frac{f(z) \dd{z}}{z-w}} \leq \frac{1}{\abs{w} - R} \qty( \sup_{z \in \Im \gamma} \abs{f(z)} ) \mathrm{length}(\gamma)
	\]
	Hence, \( H(w) \to 0 \) as \( \abs{w} \to \infty \), as claimed.
	Hence \( H \) is bounded, since \( H \) is continuous, and \( \abs{H(w)} \leq 1 \) outside some closed disc \( \overline{D(0,R_1)} \).
	By Liouville's theorem, \( H \) is constant, and by the claim, \( H = 0 \).
	In particular, \( h = 0 \).
\end{proof}
\begin{corollary}
	Let \( U \subset \mathbb C \) be open and \( \gamma_1, \dots, \gamma_n \) be closed curves in \( U \) such that \( \sum_{j=1}^n I(\gamma_j;w) = 0 \) for all \( w \in \mathbb C \setminus U \).
	Then, for any holomorphic \( f \colon U \to \mathbb C \), we have
	\[
		f(w) \sum_{j=1}^n I(\gamma_j;w) = \sum_{j=1}^n \frac{1}{2\pi i} \int_{\gamma_j} \frac{f(z) \dd{z}}{z-w}
	\]
	for all \( w \in U \setminus \bigcup_{j=1}^n \Im \gamma_j \), and
	\[
		\sum_{j=1}^n \int_{\gamma_j} f(z) \dd{z} = 0
	\]
\end{corollary}
\begin{proof}
	For the first part, define \( g(z,w) \) as before, but let
	\[
		V = \qty{w \in \mathbb C \setminus \bigcup_{j=1}^n \Im \gamma_j \colon \sum_{j=1}^n I(\gamma_j;w) = 0}
	\]
	In the definitions of \( h \) and \( h_1 \), use the sum of the integrals over \( \gamma_j \).
	Then we can proceed as above.
	The second part follows from the first as before.
\end{proof}
\begin{corollary}
	Let \( U \subset \mathbb C \) be open and let \( \beta_1, \beta_2 \) be closed curves in \( U \) such that \( I(\beta_1;w) = I(\beta_2;w) \) for all \( w \in \mathbb C \setminus U \).
	Then
	\[
		\int_{\beta_1} f(z) \dd{z} = \int_{\beta_2} f(z) \dd{z}
	\]
	for all holomorphic functions \( f \colon U \to \mathbb C \).
\end{corollary}
\begin{proof}
	We can apply the second part of the previous corollary with \( \gamma_1 = \beta_1 \) and \( \gamma_2 = -\beta_2 \), noting that \( I(-\beta_2;w) = -I(\beta_2;w) \) for any \( w \not\in \Im \beta_2 \).
\end{proof}

\subsection{Homotopy}
The set of closed curves in \( U \) such that Cauchy's theorem is valid is the set of holomorphic functions homologous to zero.
We will now construct a more restrictive condition, the condition of being \textit{null-homotopic}.
\begin{definition}
	Let \( U \subseteq \mathbb C \) be a domain, and let \( \gamma_0, \gamma_1 \colon [a,b] \to U \) be closed curves.
	We say that \( \gamma_0 \) is \textit{homotopic to \( \gamma_1 \) in \( U \)} if there exists a continuous map \( H \colon [0,1] \times [a,b] \to U \) such that for all \( s \in [0,1] \), \( t \in [a,b] \),
	\[
		H(0,t) = \gamma_0(t);\quad H(1,t) = \gamma_1(t);\quad H(s,a) = H(s,b)
	\]
	Such a map is called a \textit{homotopy} between \( \gamma_0, \gamma_1 \).
\end{definition}
For \( 0 \leq s \leq 1 \), if we let \( \gamma_s\colon [a,b] \to U \) be defined by \( \gamma_s(t) = H(s,t) \) for \( t \in [a,b] \), then the above conditions imply that \( \qty{\gamma_s \colon s \in [0,1]} \) is a family of continuous closed curves in \( U \) which deform \( \gamma_0 \) to \( \gamma_1 \) continuously without leaving \( U \).
\begin{definition}
	A closed curve is \textit{null-homotopic} in a certain domain if it is homotopic to a constant curve in the domain, such as \( \gamma(t) = z \) for \( z \) fixed.
\end{definition}
\begin{theorem}
	If \( \gamma_0, \gamma_1 \colon [a,b] \to U \) are homotopic closed curves in \( U \), then \( I(\gamma_0; w) = I(\gamma_1;w) \) for all \( w \in \mathbb C \setminus U \).
	In particular, if a closed curve \( \gamma \) is null-homotopic in \( U \), it is homologous to zero in \( U \).
\end{theorem}
\begin{proof}
	Let \( H \colon [0,1] \times [a,b] \to U \) be a homotopy between \( \gamma_0 \) and \( \gamma_1 \).
	Since \( H \) is continuous and \( [0,1] \times [a,b] \) is compact, the image \( K = H([0,1] \times [a,b]) \) is a compact subset of the open set \( U \).
	Therefore, there exists \( \varepsilon > 0 \) such that for all \( w \in \mathbb C \setminus U \), \( \abs{w - H(s,t)} > 2\varepsilon \) for all \( (s,t) \in [0,1] \times [a,b] \).
	Since \( H \) is uniformly continuous on \( [0,1] \times [a,b] \), there exists \( n \in \mathbb N \) such that
	\[
		\forall (s,t),(s',t') \in [0,1] \times [a,b],\; \abs{s-s'} + \abs{t-t'} \leq \frac{1}{n} \implies \abs{H(s,t) - H(s',t')} < \varepsilon
	\]
	For \( k = 0,1,2,\dots,n \), we let \( \Gamma_k(t) = H(k/n,t) \) for \( a \leq t \leq b \).
	Then the \( \Gamma_k \) are closed continuous curves with \( \Gamma_0 = \gamma_0 \) and \( \Gamma_n = \gamma_1 \).
	Hence, for all \( t \in [a,b] \),
	\[
		\underbrace{\abs{\Gamma_{k-1}(t) - \Gamma_k(t)}}_{< \varepsilon} < \underbrace{\abs{w - \Gamma_{k-1}(t)}}_{> 2 \varepsilon}
	\]
	On the example sheets we have shown that for piecewise \( C^1 \) closed curves \( \gamma, \widetilde \gamma \), if we have \( \abs{\gamma(t) - \widetilde \gamma(t)} < \abs{w - \gamma(t)} \) for all \( t \), then \( I(\gamma;w) = I(\widetilde \gamma;w) \).
	Hence, if \( \Gamma_k \) are piecewise \( C^1 \), we can see that \( I(\Gamma_{k-1};w) = I(\Gamma_k;w) \) for all \( k \), and hence \( I(\gamma_0;w) = I(\gamma_1;w) \) as required.

	We have only assumed that \( H \) is continuous, so \( \Gamma_k \) need not be piecewise \( C^1 \).
	We can fix this problem by approximating each \( \Gamma_k \) by a polygonal curve.
	We can take
	\[
		\widetilde \Gamma_k(t) = \qty(1 - \frac{n(t-a_{j-1})}{b-a}) H\qty(\frac{k}{n},a_{j-1}) + \frac{n(t-a_{j-1})}{b-a} H\qty(\frac{k}{n}, a_j)
	\]
	for \( a_{j-1} \leq t \leq a_j \), where
	\[
		a_j = a + \frac{(b-a)j}{n}
	\]
	If we choose \( n \) so that
	\[
		\abs{s - s'} + \abs{t - t'} \leq \frac{\min\qty{1,b-a}}{n} \implies \abs{H(s,t) - H(s',t')} < \varepsilon
	\]
	the curves \( \widetilde \Gamma_k \) satisfy
	\[
		\abs{\widetilde \Gamma_{k-1}(t) - \widetilde \Gamma_k(t)} < \abs{w - \widetilde \Gamma_{k-1}(t)}
	\]
	for all \( t \in [a,b] \).
	This is because for \( t \in [a_{j-1}, a_j] \),
	\begin{align*}
		\abs{\widetilde \Gamma_{k-1}(t) - \widetilde \Gamma_k(t)} & \leq \qty(1 - \frac{n(t-a_{j-1})}{b-a}) \abs{H\qty(\frac{k-1}{n}, a_{j-1}) - H\qty(\frac{k}{n}, a_{j-1})} \\
		                                                          & + \frac{n(t-a_{j-1})}{b-a} \abs{ H\qty(\frac{k-1}{n},a_j) - H\qty(\frac{k}{n},a_j) }                      \\
		                                                          & < \varepsilon
	\end{align*}
	and
	\[
		\abs{w-\widetilde \Gamma_{k-1}(t)} \geq \abs{w - \Gamma_{k-1}(t)} - \abs{\Gamma_{k-1}(t) - \widetilde \Gamma_{k-1}(t)} > 2\varepsilon - \varepsilon = \varepsilon
	\]
	We also have, for all \( t \in [a,b] \),
	\[
		\abs{\widetilde \Gamma_0(t) - \gamma_0(t)};\quad \abs{\widetilde \Gamma_n - \gamma_1(t)} < \abs{w - \gamma_1(t)}
	\]
	Hence the result follows from the same example sheet question.
\end{proof}
\begin{remark}
	If \( \gamma \) is homologous to zero in \( U \), it is not necessarily the case that \( \gamma \) is null-homotopic.
	For insance, let \( U = \mathbb C \setminus \qty{w_1,w_2} \) for \( w_1 \neq w_2 \), and let \( U_1 = U \cup \qty{w_1} = \mathbb C \setminus \qty{w_2} \) and \( U_2 = U \cup \qty{w_2} = \mathbb C \setminus \qty{w_1} \).
	Then, consider a curve \( \gamma \) which is not null-homotopic in \( U \), but null-homotopic in each of the larger domains \( U_1, U_2 \).
	Then \( \gamma \) is homologous to zero in \( U_1 \) and \( U_2 \).
	Hence \( I(\gamma;w_1) = I(\gamma;w_2) = 0 \), so \( \gamma \) is homologous to zero in \( U \).
\end{remark}
\begin{corollary}
	If \( \gamma_0, \gamma_1 \colon [a,b] \to U \) are homotopic closed curves in \( U \), then
	\[
		\int_{\gamma_0} f(z) \dd{z} = \int_{\gamma_1} f(z) \dd{z}
	\]
	for all holomorphic \( f \colon U \to \mathbb C \).
\end{corollary}
This is immediate from previous results.
However, we can make a direct proof that does not require the most general form of Cauchy's theorem.
\begin{proof}
	With \( \widetilde \Gamma_k \) as above, consider the closed curve comprised of
	\begin{enumerate}
		\item the curve \( \widetilde \Gamma_{k-1} \) on \( [a_{j-1}, a_j] \);
		\item the line segment \( \qty[\widetilde \Gamma_{k-1}(a_j), \widetilde \Gamma_k(a_j)] \);
		\item the curve \( - \widetilde \Gamma_{k} \) on \( [a_j, a_{j-1}] \);
		\item the line segment \( \qty[\widetilde \Gamma_k(a_{j-1}), \widetilde \Gamma_{k-1}(a_{j-1})] \).
	\end{enumerate}
	This curve is contained in the disc \( D(\widetilde \Gamma_{k-1}(a_{j-1}), \varepsilon) \subseteq U \).
	We can apply the convex version of Cauchy's theorem and sum over \( j \) to find
	\[
		\int_{\widetilde \Gamma_{k-1}} f(z) \dd{z} = \int_{\widetilde \Gamma_k} f(z) \dd{z}
	\]
	Similarly we can find
	\[
		\int_{\widetilde \Gamma_0} f(z) \dd{z} = \int_{\gamma_0} f(z) \dd{z};\quad \int_{\widetilde \Gamma_n} f(z) \dd{z} = \int_{\gamma_1} f(z) \dd{z}
	\]
\end{proof}

\subsection{Simply connected domains}
\begin{definition}
	A domain \( U \) is \textit{simply connected} if every closed curve in \( u \) is null-homotopic in \( U \).
\end{definition}
Star domains \( U \) are simply connected.
Indeed, there exists a centre \( a \in U \) such that \( [a,z] \subset U \) for all \( z \in U \).
If \( \gamma \colon [a,b] \to U \) is a closed curve, let \( H(z,t) = (1-s)a + s\gamma(t) \in U \) for \( (s,t) \in [0,1] \times [a,b] \).
Then \( H(s,t) \in U \), and \( H \) is a homotopy between \( \gamma \) and the constant curve \( \gamma_0(t) = a \).
\begin{theorem}[Cauchy's theorem for simply connected domains]
	If \( U \) is simply connected, then
	\[
		\int_\gamma f(z) \dd{z} = 0
	\]
	for all holomorphic \( f \colon U \to \mathbb C \), and every closed curve \( \gamma \) in \( U \).
\end{theorem}
This is an immediate application of the above.
The converse is also true, but is harder to prove.

Hence, \( U \) is simply connected if and only if \( \int_\gamma f(z) \dd{z} = 0 \) for all holomorphic \( f \) and all closed \( \gamma \) in \( U \).
In particular, \( U \) is simply connected if and only if every closed curve in \( U \) is homologous to zero in \( U \).
Contrast this to the previous remark that if a curve is homologous to zero it is not necessarily null-homotopic.
